package fr.upmc.aladyn.transactionables;

import javassist.CannotCompileException;
import javassist.ClassPool;
import javassist.Loader;
import javassist.NotFoundException;
import javassist.Translator;
import fr.upmc.aladyn.transactionables.TransactionableTranslator;
/**
 * A main to launch all the testing applications
 * @author Ritchie Nithoo
 * @author Jules Fabry
 * @version 1.0
 *
 */
public class LancementMain {
	public static void main(String [] args){
		Translator t = new TransactionableTranslator();
		ClassPool pool = ClassPool.getDefault();
		// faire un import package pour mettre la classe 
		Loader classLoader = new Loader();
		try {
			classLoader.addTranslator(pool, t);
			classLoader.run("fr.upmc.aladyn.mainTest.MainTest1", args);
			classLoader.run("fr.upmc.aladyn.mainTest.MainTest2", args);
			classLoader.run("fr.upmc.aladyn.mainTest.MainTest3", args);
			classLoader.run("fr.upmc.aladyn.mainTest.MainTest4", args);
			classLoader.run("fr.upmc.aladyn.mainTest.MainTest5", args);
			classLoader.run("fr.upmc.aladyn.mainTest.MainTest6", args);
			classLoader.run("fr.upmc.aladyn.mainTest.MainTest7", args);
			classLoader.run("fr.upmc.aladyn.mainTest.MainTest8", args);
			classLoader.run("fr.upmc.aladyn.mainTest.MainTest9", args);
			classLoader.run("fr.upmc.aladyn.mainTest.MainTest10", args);
		} catch (NotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (CannotCompileException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (Throwable e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
